<?php

namespace App\Models\Entity\pic_albums;

use Eloquent as Model;
use Illuminate\Database\Eloquent\SoftDeletes;
use App\Models\Entity\Asset\Video\Vasseti;
use App\Models\Entity\Asset\Vlive\Vchan;

/**
 * Class tag_content
 * @package App\Models\Entity\tag_content
 * @version June 24, 2018, 1:20 pm CST
 *
 * @property integer tag_id
 * @property string content_model
 * @property integer content_id
 */
class pic_album_pics extends Model
{
    use SoftDeletes;


    public $table = 'pic_album_pics';
    

    protected $dates = ['deleted_at'];


    public $fillable = [
        'pic_album_id',
        'vposteri_id'
    ];

    /**
     * The attributes that should be casted to native types.
     *
     * @var array
     */
    protected $casts = [
        'vposteri_id' => 'integer',
        'pic_album_id' => 'integer'
    ];

    /**
     * Validation rules
     *
     * @var array
     */
    public static $rules = [
        'pic_album_id' => 'required|integer',
        'vposteri_id' => 'required|integer'
    ];

    public function posteris()
    {
        return $this->belongsTo(\App\Models\Entity\Asset\Video\Media\Vposteri::class,'vposteri_id');
    }
}
